<?php

use Illuminate\Support\Facades\Validator;

Validator::extendImplicit('phone', function ($attribute, $value, $parameters, $validator) {
    // nullable
    if ($value) {
        return preg_match('/1\d{10}/', $value);
    }
    return true;
}, trans('validation.phone'));
